﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Nutrition.aspx.cs" Inherits="Smart.Pages.Nutrition" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <br />
    <asp:GridView  ID="gvMeals" runat="server" AllowPaging="TRUE" 
        PageSize="10" Width="400px"
        HeaderStyle-CssClass="table_header" RowStyle-Wrap="false"
        RowStyle-HorizontalAlign="Left" BorderColor="White" GridLines="None"
        BorderStyle="Ridge" BorderWidth="2px" CellPadding="3" CellSpacing="1" 
        AutoGenerateColumns="false" onpageindexchanging="gvMeals_PageIndexChanging"               
        >

        <RowStyle BackColor="White" Height="20px" />
        <PagerStyle BackColor="LightGray" ForeColor="Black" HorizontalAlign="Right" />
        <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#4b6c9e" Font-Bold="True" ForeColor="White" />

      <Columns>
        <asp:TemplateField HeaderText="Номер">
            <ItemTemplate> <%# Eval("Id") %> </ItemTemplate>
        </asp:TemplateField>
         <asp:TemplateField HeaderText="Ястие">
            <ItemTemplate> <%# Eval("Name") %> </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Детайли">
            <ItemTemplate> <%# Eval("Details") %> </ItemTemplate>
        </asp:TemplateField>
        
      </Columns>
 </asp:GridView>
     <br />
     <p>
    <asp:Label ID="lblMealId" runat="server" Text="Избери номер"></asp:Label>
    <asp:TextBox ID="tbMealId" Width="30" runat="server"></asp:TextBox>  <br />
    <asp:Label ID="Label3" runat="server" Text="Въведи количество (грамове)"></asp:Label>
    <asp:TextBox ID="tbQuantity" Width="50" runat="server"></asp:TextBox>
    </p>
    <br />
    <p>
    <asp:Button ID="Button2" runat="server" onclick="Button2_Click" Text="Изчисли хранителна стойност" />
    <asp:Button ID="Button3" runat="server" onclick="Button3_Click" Text="Добави запис за справка" />
    </p><br />
    <asp:Label ID="lblResult" runat="server" ></asp:Label>
</asp:Content>
